<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<title>Creeper?</title>   
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://shc7432.github.io/public/something/sometool.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://shc7432.github.io/public/getLinkInput/getLinkInput.js"></script>
<script src="https://shc7432.github.io/public/something/other/userdata.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css?">
<script src="https://shc0743.github.io/crypto-js/core.js"></script>
<script src="https://shc0743.github.io/crypto-js/enc-base64.js"></script>
<script src="https://shc0743.github.io/crypto-js/enc-hex.js"></script>
<script src="https://shc0743.github.io/crypto-js/enc-utf8.js"></script>
<script src="https://shc0743.github.io/crypto-js/enc-utf16.js"></script>
<script src="https://shc0743.github.io/crypto-js/crypto-js.js"></script>
<script src="https://shc0743.github.io/crypto-js/aes.js"></script>
<script src="https://shc0743.github.io/crypto-js/md5.js"></script>
<script src="https://shc0743.github.io/crypto-js/sha1.js"></script>
<script src="https://shc0743.github.io/crypto-js/sha512.js"></script>
<script src="https://pv.sohu.com/cityjson"></script>
<style>
.gray {
color: gray;
text-decoration: none;
}
.linksmall {
font-size: 12px;
}
</style>
</head>
<body>

<div class="inputcontent" title="编辑歌词" hidden 
oninput="sessionStorage.editsing=this.innerHTML;"
style="border:1px solid #ccc;" contenteditable></div>

<div>

<div>
<a class="gray linksmall" href="javascript:creepergame.editsing()">编辑歌词</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a class="gray linksmall" href="javascript:creepergame.start()">开始</a>
<!--&nbsp;&nbsp;&nbsp;&nbsp;
<a class="gray linksmall" href="javascript:creepergame.parse()">暂停</a>-->
&nbsp;&nbsp;&nbsp;&nbsp;
<a class="gray linksmall" href="javascript:creepergame.reset();">重置</a>
</div>

<div style="border: 1px solid #ccc;" id=gameout>

</div>

<div style="border: 1px solid #ccc;color:#ccc;font-size:10px;">
答对题数: <span style="color:#0000ff;"></span>
<script src="https://shc7432.github.io/public/something/other/userdata.js"></script>
<div style="font-size:10px;color:#ccc;">IP:<script>
document.write(getIP())</script></div>
<div style="font-size:10px;color:#ccc;">uid:<script>
document.write(userData.uid)</script></div>
<div style="font-size:10px;color:#ccc;">ID:<script>
document.write(userData.id)</script></div>
<div style="font-size:10px;color:#ccc;">RandomID:<script>
document.write(userData.rid)</script></div>
</div>

</div>

<script>
if(sessionStorage.editsing){
document.querySelector(".inputcontent").innerHTML=sessionStorage.editsing
}
window.a_elementdata=document.querySelectorAll("a.gray.linksmall");

window.creepergame=new Object()

creepergame.editsing=function(){
let a=document.querySelector(".inputcontent");
if(a.hidden){a.hidden=0;} else {a.hidden=1;}
}

creepergame.reset=function(){
gameout.innerHTML=""
}

creepergame.start=function(){
a_elementdata[1].hidden=1;
let elem=document.querySelector(".inputcontent");
elem.innerHTML=elem.innerHTML.replace(/\u0020/ig,"")
elem.innerHTML=elem.innerHTML.replace(/[\u4e00-\u9fa5]/ig,"")
elem.innerHTML=elem.innerHTML.replace
(/[，。？！“”（）～：；、……‘’《》｛｝［］——＊ | ·＃〖〗【】『』〔〕「」]/ig,"")
let inp=elem.innerHTML.replace(/\u003c\u0062\u0072\u0020\u002f\u003e/ig,"\n");
while(1){
if((inp.split("")[0])=="\n"){
inp.replace("\n","")
 } else break;
}
inp=inp.split("\n");
gameout.innerHTML+=("<div>"+inp[0]+"</div><div contenteditable "+
"class=userinp></div>");
let userinp=document.querySelector(".userinp");
userinp=userinp[userinp.length-1];
userinp.oninput=function(){
if(/\n/.test(this.innerHTML)) creepergame.panduanduicuo()
}
let inp2="";
for(let i=1;i<inp.length;i++){
inp2+=inp[i];
}
inp=inp2;
while(1){
if((inp.split("")[0])=="\n"){
inp.replace("\n","")
 } else break;
}
inp=inp.split("\n");
creepergame.data.success=inp[0];
inp2="";
for(let i=1;i<inp.length;i++){
inp2+=inp[i];
}
inp=inp2;
elem.innerHTML=inp.replace(/\n/ig,"<br />");
}
creepergame.data={};
creepergame.data.successnumber=0;
creepergame.panduanduicuo=function(){
let userinp=document.querySelector(".userinp");
userinp=userinp[userinp.length-1];
if(userinp.innerHTML==creepergame.data.success){
this.backgroundColor="#0f0";
creepergame.data.successnumber+=1;
creepergame.start();
} else userinp.innerHTML=userinp.innerHTML.replace(/\n/g,"")
}
</script>

</body>
</html>
